package httpresult

type ResponseSuccessBean struct {
	Code    uint32      `json:"code"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
	TraceId string      `json:"traceId"`
}
type NullJson struct{}

func Success(data interface{}, traceId string) *ResponseSuccessBean {
	return &ResponseSuccessBean{200, "OK", data, traceId}
}

type ResponseErrorBean struct {
	Code    uint32 `json:"code"`
	Msg     string `json:"msg"`
	TraceId string `json:"traceId"`
}

func Error(errCode uint32, errMsg string, traceId string) *ResponseErrorBean {
	return &ResponseErrorBean{errCode, errMsg, traceId}
}
